package com.erp.erp_servers.money.imp;

import com.erp.erp_dao.money.IPaymentDetailActuallyDao;
import com.erp.erp_entitys.money.entity.PaymentDetailActuallyEntity;
import com.erp.erp_servers.money.IPaymentDetailActuallyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName : PaymentDetailActuallyServiceImp
 * @Description : 付款实付表接口实现类
 * @Author : lst
 * @Date: 2021-04-04 23:15
 */
@Service
public class PaymentDetailActuallyServiceImp implements IPaymentDetailActuallyService {

    /**
     * 注入mapper
     */
    private final IPaymentDetailActuallyDao paymentDetailActuallyDao;

    @Autowired
    public PaymentDetailActuallyServiceImp(IPaymentDetailActuallyDao paymentDetailActuallyDao) {
        this.paymentDetailActuallyDao = paymentDetailActuallyDao;
    }

    /**
     * 通过ID查询单条数据
     *
     * @param id 主键
     * @return 实例对象
     */
    @Override
    public PaymentDetailActuallyEntity queryById(Integer id) {
        return paymentDetailActuallyDao.queryById(id);
    }

    /**
     * 通过实体作为筛选条件查询
     *
     * @param paymentDetailActually 实例对象
     * @return 对象列表
     */
    @Override
    public List<PaymentDetailActuallyEntity> queryAll(PaymentDetailActuallyEntity paymentDetailActually) {
        return paymentDetailActuallyDao.queryAll(paymentDetailActually);
    }

    /**
     * 新增数据
     *
     * @param paymentDetailActually 实例对象
     * @return 影响行数
     */
    @Override
    public int insert(PaymentDetailActuallyEntity paymentDetailActually) {
        return paymentDetailActuallyDao.insert(paymentDetailActually);
    }

    /**
     * 修改数据
     *
     * @param paymentDetailActually 实例对象
     * @return 影响行数
     */
    @Override
    public int update(PaymentDetailActuallyEntity paymentDetailActually) {
        return paymentDetailActuallyDao.update(paymentDetailActually);
    }

    /**
     * 批量新增
     * @param list 新增对象集合
     * @return 影响行数
     */
    @Override
    public int addList(List<PaymentDetailActuallyEntity> list) {
        return paymentDetailActuallyDao.addList(list);
    }
}
